package InheritanceDemo;

// 子类: Student.java（继承Person）
public class Student extends Person {
    private double score;  // 特有属性：成绩

    // 子类构造方法
    public Student(String id, String name, double score) {
        super(id, name);  // 调用父类构造方法
        this.score = score;
    }

    // 特有方法：获取成绩
    public double getScore() { return score; }
    public void setScore(double score) { this.score = score; }
}